<template>
  <view>
    <web-view
      :webview-styles="webviewStyles"
      src="/static/test.html"
      @message="openModal"
    ></web-view>
  </view>
</template>

<script>
import Test from "../../component/Test.vue";
export default {
  components: {
    Test,
  },
  mounted() {
    console.log("这是在工程上的行为");
  },

  data() {
    return {
      webviewStyles: {
        progress: {
          color: "red",
        },
      },
    };
  },
  methods: {
    openModalA() {
      console.log("kaishi");
      this.$refs.test.visible = true;
    },
    openModal(e) {
      console.log(e);
    },
  },
};
</script>
<style>
.the-button {
  cursor: pointer;
  background-color: red;
}
</style>
